package com.gitee.wsl.struct.product.money.pay

enum class PaymentMethod {
    UNKNOWN,
    DIRECT_DEBIT,
    NON_DIRECT_DEBIT,
    ;

    companion object {
        fun fromValue(value: String?): PaymentMethod = try {
            value?.let {
                valueOf(it.uppercase())
            } ?: UNKNOWN
        } catch (e: IllegalArgumentException) {
            UNKNOWN
        }
    }
}